package ch.netcetera.planningpoker.client.ui.admin.round;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.Widget;

public class ModeratorRoundView extends Composite implements ModeratorRoundPresenter.IView {

    private static RoundViewUiBinder uiBinder = GWT
            .create(RoundViewUiBinder.class);

    interface RoundViewUiBinder extends UiBinder<Widget, ModeratorRoundView> {
    }

    @UiField
    Button create;
    
    @UiField
    TextBox roundTitle;
    
    @UiField
    FlowPanel newRound;
    
    @UiField
    FlowPanel openRound;
    
    @UiField
    FlowPanel currentRound;
        
    @UiField
    Button closeRound;
    
    public ModeratorRoundView() {
        initWidget(uiBinder.createAndBindUi(this));
    }

    @Override
    public void addToSlot(Object slot, Widget content) {
        // TODO Auto-generated method stub
        
    }

    @Override
    public void removeFromSlot(Object slot, Widget content) {
        // TODO Auto-generated method stub
        
    }

    @Override
    public void setInSlot(Object slot, Widget content) {
        // TODO Auto-generated method stub
        
    }

    @Override
    public HasClickHandlers getCreate() {
        return create;
    }

    @Override
    public HasText getRoundTitle() {
        return roundTitle;
    }

    @Override
    public void setOpenRoundVisible(boolean isOpenRoundVisible) {
        newRound.setVisible(isOpenRoundVisible);
        openRound.setVisible(!isOpenRoundVisible);
    }

    @Override
    public HasClickHandlers getCloseRound() {
        return closeRound;
    }

    @Override
    public HasWidgets getCurrentRound() {
        return currentRound;
    }

}
